package com.cskaoyan.module.ddp.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * FootPrintVo
 *
 * @param
 * @return
 * @2022/4/11
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FootPrintVo {
    @JsonProperty("total")
    private Long total;
    @JsonProperty("pages")
    private Integer pages;
    @JsonProperty("limit")
    private Integer limit;
    @JsonProperty("page")
    private Integer page;
    @JsonProperty("list")
    private List<ListDTO> list;

    @NoArgsConstructor
    @Data
    public static class ListDTO {
        @JsonProperty("brief")
        private String brief;
        @JsonProperty("picUrl")
        private String picUrl;
        @JsonProperty("addTime")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date addTime;
        @JsonProperty("goodsId")
        private Integer goodsId;
        @JsonProperty("name")
        private String name;
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("retailPrice")
        private BigDecimal retailPrice;

        @Override
        public String toString() {
            return "{" +
                    "brief='" + brief + '\'' +
                    ", picUrl='" + picUrl + '\'' +
                    ", addTime='" + addTime + '\'' +
                    ", goodsId=" + goodsId +
                    ", name='" + name + '\'' +
                    ", id=" + id +
                    ", retailPrice=" + retailPrice +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "{" +
                "total=" + total +
                ", pages=" + pages +
                ", limit=" + limit +
                ", page=" + page +
                ", list=" + list +
                '}';
    }
}
